﻿export default [
  {
    path: '/user',
    layout: false,
    routes: [
      { name: '登录', path: '/user/login', component: './admin/login' },
      { name: '注册', path: '/user/register', component: './admin/register' },
    ],
  },
  {
    path: '/',
    access: 'canUser',
    flatMenu: true,
    routes: [
      { path: '/', name: '首页', component: './index/index', hideInMenu: true },
      { path: '/bisheProject', name: '原创精品', component: './bisheProject' },
      { path: '/bisheProject/detail/:id', component: './bisheProject/detail', hideInMenu: true },
      { path: '/bisheProject/order/:id', component: './bisheProject/order', hideInMenu: true },
      { path: '/serviceProject', name: '项目服务', component: './serviceProject' },
      { path: '/serviceProject/detail/:id', component: './serviceProject/detail', hideInMenu: true },
      { path: '/serviceProject/order/:id', component: './serviceProject/order', hideInMenu: true },
      { path: '/essay', name: '交流大厅', component: './essay' },
      { path: '/essay/detail/:id', component: './essay/detail',hideInMenu: true },
      { path: '/welcome', name: '欢迎', icon: 'smile', component: './Welcome' },
      { path: '/home', name: '首页', icon: 'smile', component: './dashboard' },
    ]
  },
  {
    path: '/dashboard',
    name: '控制面板',
    icon: 'dashboard',
    access: 'canAdmin',
    routes: [
      { path: '/dashboard', redirect: '/dashboard/workplace' },
      { name: '工作台', path: '/dashboard/workplace', component: './dashboard/workplace' },
      { name: '分析页', path: '/dashboard/analysis', component: './dashboard/analysis' },
    ]
  },
  {
    path: '/admin',
    name: '管理页',
    icon: 'crown',
    access: 'canAdmin',
    routes: [
      { path: '/admin', redirect: '/admin/user' },
      { name: '用户管理', path: '/admin/user', component: './admin/user' },
      { name: '毕设项目管理', path: '/admin/bisheProject', component: './admin/bisheProject' },
      { name: '服务项目管理', path: '/admin/serviceProject', component: './admin/serviceProject' },
      { name: '帖子管理', path: '/admin/post', component: './admin/post' },
      { name: '评论管理', path: '/admin/comment', component: './admin/comment' },
      { name: '订单管理', path: '/admin/orderInfo', component: './admin/orderInfo' },
    ],
  },
  {
    path: '/account/info',
    name: '个人信息',
    icon: 'user',
    component: './account',
  },
  { path: '*', layout: false, component: './404' },
];
